


<div id="opacityRegisterDiv">

</div>
<div id="registerationDiv">
    <a href="javascript:void(0);" title="close" class="close"><img class="close" src="images/close.png" width="30px"/></a>
    <form action="signUp.php"  method="post" enctype="multipart/form-data">
        <div id="registerationDivRegisterArea">
            <div id="registerationDivRegisterAreaTitle">
                <img src="images/user4.png" width="25px"/> <h2>Registration Information</h2>
            </div>
            <div id="registerationDivRegisterAreaFields">
                <table>
                    <tr>
                        <td><p>First Name</p></td>
                        <td><input type="text" name="fName" value=""/></td>
                    </tr>
                    <tr>
                        <td><p>Last Name</p></td>
                        <td><input type="text" name="lName" value=""/></td>
                    </tr>
                    <tr>
                        <td><p>user name</p></td>
                        <td><input type="text" name="userName" value=""/></td>
                    </tr>
                    <tr>
                        <td><p>Password</p></td>
                        <td><input type="password" name="password" value=""/></td>
                    </tr>
                    <tr>
                        <td><p>e-mail</p></td>
                        <td><input type="text" name="eMail" value=""/></td>
                    </tr>
                    <tr>
                        <td><p>Creit Card</p></td>
                        <td><input type="text" name="credit" value=""/></td>
                    </tr>

                    <tr>
                        <td></td>
                        <td>
                            <input class="buttons" type="submit" value="register"/>
                            <input class="buttons" type="reset" value="clear fields"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="registerationDivInfoArea">
            <div id="registerationDivInfoAreaTitle"><h2>Why to use Mobizoo?</h2></div>
            <div id="registerationDivInfoAreaText">
                <p>Mobizoo is an E-Commerce site that facilitate the purchuasing mobile products and its accessories.</p>
            </div>
        </div>
    </form>
</div>

<div id="header">
    <ul id="homeButtonUL">
        <a href="index.php"><li class="homeButton" ><img src="images/home.png" width="30px"/></li></a>
        <li>

		
		<form action="login.php"  method="post" enctype="multipart/form-data">
        <div id="loginArea">
        <ul>
            <li class="headerNavLinks">
                <div id="loginTitle">
                    <?php
//                    echo $_SESSION['lang'];
                    if (isset($_SESSION['name']))
                        echo '<a href="javascript:void(0)"><p style="font-size: 12px; color: lightblue;"> ' . 'HI , '.$_SESSION['name'] . '</p></a>';
                    else
                        echo '<a href="javascript:void(0)"><p style="font-size: 12px; color: lightblue;">Login/Register</p></a>';
                    ?>
                </div>
            </li>
            <li>
                <div id="loginFields">
                    <?php
                    if (isset($_SESSION['name'])) {
                        if ($_SESSION['role'] == 'admin') {
                            echo '<div id="loggedInDiv">
                            <a href="logout.php" >' . $header_Login_Logout . '</a>
                            <a href="admin.php" >' . $header_Login_ControlPanel . '</a>
                            <div id="langArea">
                                <img src="images/lang.png" height="30px"/>
                                <input type="button" content="ar" class="langChange" value="ar"/>
                                <input type="button" content="en" class="langChange" value="en"/>
                            </div>
                            </div>';
                        } else {
                            echo '<div id="loggedInDiv">
							
                            <a href="logout.php" >' . Logout . '</a>
                            <a href="userProfile.php" >' . UserProfile . '</a>
                            
                            </div>';
                        }
                    } else {
                        echo '<input style="margin-right: 5px;float: left;" type="text" name="user" value="user name" class="grayClass" content="user name" />
                    <!--<p style="float: left;font-size: 12px; margin-left: 10px; color: white;">password</p>-->
                    <input style="margin-right: 5px;float: left;" type="password" name="pass" value="password" content="password" class="grayClass"/>
                    <input id="login" type="submit" value="login"/>
                    <input id="register" type="button" value="Register"/>';
                    }
                    ?>

                </div>
            </li>
        </ul>
    </div>
</form>

</li>

    </ul>
    <ul id="cartButton">
        <a href="cart.php">
            <li class="cartNav"><img src="images/cart.png" width="25px"/>
                <?php
                if (!isset($_SESSION['id'])) {
                    echo '<p>login</p>';
                } else {
                    $count = 0;
                    $userID = $_SESSION['id'];
//                echo $userID;
//                    $count = 0;
                   /*.. $sql = "SELECT * FROM `cart` WHERE active = 1 AND userId = " . $userID . "";
                    $result = mysql_query($sql);
                    while($row=  mysql_fetch_array($result)){
                        $count++;
                    }
                    $count = mysql_num_rows($result);
                echo $count;*/
                    //echo '<p id="cartParagraph" content="' . $count . '">[' . $count . ']</p>';
					echo '<p id="cartParagraph" content="' . (count($_SESSION['cart'])) . '">[' . (count($_SESSION['cart'])) . ']</p>';

                }
                ?>
            </li>
        </a>
    </ul>
    <ul id="headerNavLinksUL">
        <a href="history.php"><li class="headerNavLinks">
                <?php
                echo 'History';
                ?>
            </li></a>
        <a href="products.php"><li class="headerNavLinks">
                <?php
                echo 'Products';
                ?>
            </li></a>
			
			<?php 
			if(isset($_SESSION['name'])){
			
			echo  '<a href="logout.php"><li class="headerNavLinks">';
 echo 'Logout';
			
			
			}
			
			
			
			?>
			
                       
					  
                     
               
               
                
            </li></a>					 
       
    </ul>

</div>
